package com.epam.strings.actions;

import com.epam.strings.entities.Lexeme;

import java.util.List;
import java.util.Set;
import java.util.TreeSet;

/**
 * Created with IntelliJ IDEA.
 * User: Yelena_Mamadaliyeva
 * Date: 13.08.13
 * Time: 15:30
 * To change this template use File | Settings | File Templates.
 */
public class LexemeSorter {

    public static Set sort(List<Lexeme> lexemeList) {
        Set<String> set = new TreeSet<String>();
        //for (String word : (book.getParagraphList().get(0).getSentenceList().get(1).getLexemeList()) {
        for (int i = 0; i <= lexemeList.size() - 1; i++) {
            set.add(lexemeList.get(i).toString());
        }
        return set;
    }

}
